package io.leo.leoutils;

import android.text.Editable;
import android.text.TextWatcher;
import android.widget.TextView;

public class BindingTextWacher implements TextWatcher {
    private final TextView bindingView;

    public BindingTextWacher(TextView bindingView){
        this.bindingView = bindingView;
    }

    @Override
    public void beforeTextChanged(CharSequence s, int start, int count, int after) {

    }

    @Override
    public void onTextChanged(CharSequence s, int start, int before, int count) {
        bindingView.setText(s);
    }

    @Override
    public void afterTextChanged(Editable s) {

    }
}
